Package com.cisco.pt.ipc.sim.impl
Class CiscoDeviceImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.DeviceImpl
com.cisco.pt.ipc.sim.impl.CiscoDeviceImpl
- All Implemented Interfaces:
IPCObject,CiscoDevice,Device
- Direct Known Subclasses:
ASAImpl,RouterImpl
Information provided by the PKI file:
\class CiscoDevice
\brief CiscoDevice is any Cisco-branded device with a terminal line.
\example network().getDevice("Router0")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionCiscoDeviceImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBootSystem(String name) Information provided by the PKI file:voidaddUserPassEntry(String username, String password, int type) Information provided by the PKI file:voidInformation provided by the PKI file:voidInformation provided by the PKI file:enterCommand(String commandStr, String modeStr) Information provided by the PKI file:Information provided by the PKI file:getBia()Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getLine(int num) Information provided by the PKI file:Information provided by the PKI file:booleanInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getUserEntryAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:getVtyLine(int num) Information provided by the PKI file:booleanInformation provided by the PKI file:booleanisUserExist(String username) Information provided by the PKI file:voidInformation provided by the PKI file:booleanremoveBootSystem(String name) Information provided by the PKI file:voidremoveUserPassAt(int index) Information provided by the PKI file:voidremoveUserPassEntry(String username) Information provided by the PKI file:voidsetBannerMotd(String banner) Information provided by the PKI file:voidsetEnablePassword(String password, int level) Information provided by the PKI file:voidsetEnableSecret(String password) Information provided by the PKI file:voidsetFtpPasswd(String passwd, int uType) Information provided by the PKI file:voidsetFtpUsername(String username) Information provided by the PKI file:voidsetHostName(String hostname) Information provided by the PKI file:voidsetNextConfigRegister(Short in_register) Information provided by the PKI file:voidsetServicePasswordEncryption(boolean bEnable) Information provided by the PKI file:voidsetStartupFile(String str) Information provided by the PKI file:voidsetTimeZone(String timeZone, Short hourOffset, Short minOffset) Information provided by the PKI file:voidskipBoot()Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.DeviceImpl
activityTreeToXml, addCustomVar, addDeviceExternalAttributes, addModule, addProgrammingSerialOutputs, addSound, addUserDesktopApp, addUserDesktopAppFromGlobal, clearDeviceExternalAttributes, clearProgrammingSerialOutputs, destroySounds, getAreaLeftX, getAreaTopY, getCenterXCoordinate, getCenterYCoordinate, getCommandLine, getCustomInterface, getCustomLogicalImage, getCustomPhysicalImage, getCustomVarNameAt, getCustomVarsCount, getCustomVarStr, getCustomVarValueStrAt, getDescriptor, getDeviceExternalAttributes, getDeviceExternalAttributeValue, getGlobalXPhysicalWS, getGlobalYPhysicalWS, getModel, getName, getPhysicalObject, getPort, getPortAt, getPortCount, getPorts, getPower, getProcess, getProgrammingSerialOutputs, getRootModule, getSerialNumber, getSupportedModule, getType, getUpTime, getUsbPortAt, getUsbPortCount, getUserDesktopAppAt, getUserDesktopAppByDir, getUserDesktopAppById, getUserDesktopAppCount, getXCoordinate, getXPhysicalWS, getYCoordinate, getYPhysicalWS, hasCustomVar, isDesktopAvailable, isOutdated, isProjectRunning, moveByInPhysicalWS, moveToLocation, moveToLocationCentered, moveToLocInPhysicalWS, playSound, relinkUserDesktopApp, removeCustomVar, removeModule, removeUserDesktopApp, restoreToDefault, runCodeInProject, runProject, serializeToXml, setCustomInterface, setCustomLogicalImage, setCustomPhysicalImage, setDeviceExternalAttributes, setName, setPower, setTime, stopProject, stopSound, stopSounds, subtractDeviceExternalAttributes, updateTemplateCreationTimeMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.sim.Device
activityTreeToXml, addCustomVar, addDeviceExternalAttributes, addModule, addProgrammingSerialOutputs, addSound, addUserDesktopApp, addUserDesktopAppFromGlobal, clearDeviceExternalAttributes, clearProgrammingSerialOutputs, destroySounds, getAreaLeftX, getAreaTopY, getCenterXCoordinate, getCenterYCoordinate, getCommandLine, getCustomInterface, getCustomLogicalImage, getCustomPhysicalImage, getCustomVarNameAt, getCustomVarsCount, getCustomVarStr, getCustomVarValueStrAt, getDescriptor, getDeviceExternalAttributes, getDeviceExternalAttributeValue, getGlobalXPhysicalWS, getGlobalYPhysicalWS, getModel, getName, getPhysicalObject, getPort, getPortAt, getPortCount, getPorts, getPower, getProcess, getProgrammingSerialOutputs, getRootModule, getSerialNumber, getSupportedModule, getType, getUpTime, getUsbPortAt, getUsbPortCount, getUserDesktopAppAt, getUserDesktopAppByDir, getUserDesktopAppById, getUserDesktopAppCount, getXCoordinate, getXPhysicalWS, getYCoordinate, getYPhysicalWS, hasCustomVar, isDesktopAvailable, isOutdated, isProjectRunning, moveByInPhysicalWS, moveToLocation, moveToLocationCentered, moveToLocInPhysicalWS, playSound, relinkUserDesktopApp, removeCustomVar, removeModule, removeUserDesktopApp, restoreToDefault, runCodeInProject, runProject, serializeToXml, setCustomInterface, setCustomLogicalImage, setCustomPhysicalImage, setDeviceExternalAttributes, setName, setPower, setTime, stopProject, stopSound, stopSounds, subtractDeviceExternalAttributes, updateTemplateCreationTimeMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
CiscoDeviceImpl
public CiscoDeviceImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
setHostName
Information provided by the PKI file:
\brief Sets the hostname of this device with the specified string. \param string, the hostname string.- Specified by:
setHostNamein interfaceCiscoDevice- Parameters:
hostname- Takes in a parameter of hostname
-
getHostName
Information provided by the PKI file:
\brief Returns the hostname of this device. \return string, the hostname of this device.- Specified by:
getHostNamein interfaceCiscoDevice- Returns:
- String Returns a String
-
setEnableSecret
Information provided by the PKI file:
\brief Sets the encrypted enable secret password with the specified string. \param string, the encrypted secret password string.- Specified by:
setEnableSecretin interfaceCiscoDevice- Parameters:
password- Takes in a parameter of password
-
getEnableSecret
Information provided by the PKI file:
\brief Returns the encrypted enable secret string. \return string, the encrypted enable secret string.- Specified by:
getEnableSecretin interfaceCiscoDevice- Returns:
- String Returns a String
-
setEnablePassword
Information provided by the PKI file:
\brief Sets the enable password. \param password, the clear text password string. \param level, the level must be 7 or 0. 7 is hidden.- Specified by:
setEnablePasswordin interfaceCiscoDevice- Parameters:
password- Takes in a parameter of passwordlevel- Takes in a parameter of level
-
getEnablePassword
Information provided by the PKI file:
\brief Returns the enable password. \return string, the enable password.- Specified by:
getEnablePasswordin interfaceCiscoDevice- Returns:
- String Returns a String
-
setStartupFile
Information provided by the PKI file:
\brief Sets the startup file to the specified file. \param str, the filename of the config file.- Specified by:
setStartupFilein interfaceCiscoDevice- Parameters:
str- Takes in a parameter of str
-
getStartupFile
Information provided by the PKI file:
\brief Returns the contents of the current startup file. \return vector<string>, the contents of the current startup file.- Specified by:
getStartupFilein interfaceCiscoDevice- Returns:
- List<String> Returns a List<String>
-
addBootSystem
Information provided by the PKI file:
\brief Modifies the system parameters to add a particular boot system image. \param name, the boot system name. \return bool, true if successful, otherwise false.- Specified by:
addBootSystemin interfaceCiscoDevice- Parameters:
name- Takes in a parameter of name- Returns:
- boolean Returns a boolean
-
removeBootSystem
Information provided by the PKI file:
\brief Removes the specified boot system from this device. \param name, the boot system name. \return bool, true if successful, otherwise false.- Specified by:
removeBootSystemin interfaceCiscoDevice- Parameters:
name- Takes in a parameter of name- Returns:
- boolean Returns a boolean
-
removeAllBootSystem
public void removeAllBootSystem()Information provided by the PKI file:
\brief Removes all boot system images from this device.- Specified by:
removeAllBootSystemin interfaceCiscoDevice
-
getBootSystems
Information provided by the PKI file:
\brief Returns the list of current boot system images. \return vector<string>, the list of current boot system images.- Specified by:
getBootSystemsin interfaceCiscoDevice- Returns:
- List<BootSystemEntry> Returns a List<BootSystemEntry>
-
getConfigRegister
Information provided by the PKI file:
\brief Returns the current config register. \return short, the current config register.- Specified by:
getConfigRegisterin interfaceCiscoDevice- Returns:
- Short Returns a Short
-
setNextConfigRegister
Information provided by the PKI file:
\brief Sets the next config register. \param in_register, the next config register.- Specified by:
setNextConfigRegisterin interfaceCiscoDevice- Parameters:
in_register- Takes in a parameter of in_register
-
getNextConfigRegister
Information provided by the PKI file:
\brief Returns the next config register. \return short, the next config register.- Specified by:
getNextConfigRegisterin interfaceCiscoDevice- Returns:
- Short Returns a Short
-
setBannerMotd
Information provided by the PKI file:
\brief Sets the message of the day banner when the device boots. \param banner, the message of the day.- Specified by:
setBannerMotdin interfaceCiscoDevice- Parameters:
banner- Takes in a parameter of banner
-
getBannerMotd
Information provided by the PKI file:
\brief Returns the message of the day banner. \return string, the message of the day.- Specified by:
getBannerMotdin interfaceCiscoDevice- Returns:
- String Returns a String
-
setTimeZone
Information provided by the PKI file:
\brief Sets the timezone for this device. \param timeZone, the timezone string. \param hourOffset, the hours offset from UTC. \param minOffset, the minutes offset from UTC.- Specified by:
setTimeZonein interfaceCiscoDevice- Parameters:
timeZone- Takes in a parameter of timeZonehourOffset- Takes in a parameter of hourOffsetminOffset- Takes in a parameter of minOffset
-
getTimeZone
Information provided by the PKI file:
\brief Returns the timezone of this device. \return string, the timezone of this device.- Specified by:
getTimeZonein interfaceCiscoDevice- Returns:
- String Returns a String
-
getBia
Information provided by the PKI file:
\brief Returns the burned-in address of this device. \return mac, the burned-in address of this device.- Specified by:
getBiain interfaceCiscoDevice- Returns:
- MACAddress Returns a MACAddress
-
setServicePasswordEncryption
public void setServicePasswordEncryption(boolean bEnable) Information provided by the PKI file:
\brief Enables or disables service password encryption. \param bEnable, true to enable service password encryption, false to disable it.- Specified by:
setServicePasswordEncryptionin interfaceCiscoDevice- Parameters:
bEnable- Takes in a parameter of bEnable
-
getServicePasswordEncryption
public boolean getServicePasswordEncryption()Information provided by the PKI file:
\brief Returns true if service password encryption is enabled, otherwise false. \return bool, true if service password encryption is enabled, otherwise false.- Specified by:
getServicePasswordEncryptionin interfaceCiscoDevice- Returns:
- boolean Returns a boolean
-
getConsole
Information provided by the PKI file:
\brief Returns the console port of this device. \return Port, the console port object.- Specified by:
getConsolein interfaceCiscoDevice- Returns:
- Port Returns a Port
-
getConsoleLine
Information provided by the PKI file:
\brief Returns the console line of this device. \return TerminalLine, the console line TerminalLine object.- Specified by:
getConsoleLinein interfaceCiscoDevice- Returns:
- TerminalLine Returns a TerminalLine
-
getVtyLine
Information provided by the PKI file:
\brief Returns the vty line specified by num. \param num, the vty line number of interest. \return TerminalLine, the vty line TerminalLine object.- Specified by:
getVtyLinein interfaceCiscoDevice- Parameters:
num- Takes in a parameter of num- Returns:
- TerminalLine Returns a TerminalLine
-
getLine
Information provided by the PKI file:
\brief Returns the line specified by num. \param num, the line number of interest. \return TerminalLine, the line TerminalLine object.- Specified by:
getLinein interfaceCiscoDevice- Parameters:
num- Takes in a parameter of num- Returns:
- TerminalLine Returns a TerminalLine
-
getIpcTerminalLine
Information provided by the PKI file:
\brief Returns the IPC terminal line of this device. \return TerminalLine, the IPC TerminalLine object.- Specified by:
getIpcTerminalLinein interfaceCiscoDevice- Returns:
- TerminalLine Returns a TerminalLine
-
enterCommand
Information provided by the PKI file:
\brief Enters the specified command in the specified mode to the terminal. \param commandStr the command string. \param modeStr the mode. Valid modes: user, enable, global. If blank, the command string will be entered into the current mode. \return pair<CommandStatus, the status of the command entry. Valid command statuses: eStatusOk = 0, eErrorAmbiguous = 1, eErrorInvalid = 2, eErrorIncomplete = 3, eErrorNotImplemented = 4- Specified by:
enterCommandin interfaceCiscoDevice- Parameters:
commandStr- Takes in a parameter of commandStrmodeStr- Takes in a parameter of modeStr- Returns:
- Pair<CommandStatus, String> Returns a Pair<CommandStatus, String>
-
isBooting
public boolean isBooting()Information provided by the PKI file:
\brief Checks whether the device is currently booting- Specified by:
isBootingin interfaceCiscoDevice- Returns:
- boolean Returns a boolean
-
skipBoot
public void skipBoot()Information provided by the PKI file:
\brief Skips the booting process.- Specified by:
skipBootin interfaceCiscoDevice
-
setFtpUsername
Information provided by the PKI file:
\brief Sets the FTP username for the device. \param username, the desired FTP username for this device.- Specified by:
setFtpUsernamein interfaceCiscoDevice- Parameters:
username- Takes in a parameter of username
-
setFtpPasswd
Information provided by the PKI file:
\brief Sets the FTP password for the device. \param passwd, the desired FTP password for this device. \param uType, whether the password is encrypted or not. 7 is encryped or 0 is unencrypted.- Specified by:
setFtpPasswdin interfaceCiscoDevice- Parameters:
passwd- Takes in a parameter of passwduType- Takes in a parameter of uType
-
getFtpUsername
Information provided by the PKI file:
\brief Returns the FTP username for the device. \return string, the FTP username for this device.- Specified by:
getFtpUsernamein interfaceCiscoDevice- Returns:
- String Returns a String
-
getFtpPasswd
Information provided by the PKI file:
\brief Returns the FTP password for the device. \return string, the FTP password for this device.- Specified by:
getFtpPasswdin interfaceCiscoDevice- Returns:
- String Returns a String
-
clearFtpUsername
public void clearFtpUsername()Information provided by the PKI file:
\brief Clears the current FTP username.- Specified by:
clearFtpUsernamein interfaceCiscoDevice
-
clearFtpPasswd
public void clearFtpPasswd()Information provided by the PKI file:
\brief Clears the current FTP password.- Specified by:
clearFtpPasswdin interfaceCiscoDevice
-
getUserPassCount
public int getUserPassCount()Information provided by the PKI file:
\brief Returns the number of authenticated users. \return int, the number of authenticated users.- Specified by:
getUserPassCountin interfaceCiscoDevice- Returns:
- int Returns a int
-
addUserPassEntry
Information provided by the PKI file:
\brief Adds an authenticated user with the specified username, password, and type. \param username, the username for the authenticated user. \param password, the password for the authenticated user. \param type, the type for the user. The default is type 0.- Specified by:
addUserPassEntryin interfaceCiscoDevice- Parameters:
username- Takes in a parameter of usernamepassword- Takes in a parameter of passwordtype- Takes in a parameter of type
-
removeUserPassEntry
Information provided by the PKI file:
\brief Removes the authenticated user with the specified username. \param username, the username of the authenticated user of interest.- Specified by:
removeUserPassEntryin interfaceCiscoDevice- Parameters:
username- Takes in a parameter of username
-
getUserEntryAt
Information provided by the PKI file:
\brief Returns the username of the authenticated user at the specified index. \param index, the index of the authenticated user of interest. \return string, the username of the authenticated user at the specified index.- Specified by:
getUserEntryAtin interfaceCiscoDevice- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
removeUserPassAt
public void removeUserPassAt(int index) Information provided by the PKI file:
\brief Removes the username of the authenticated user at the specified index. \param index, the index of the authenticated user of interest.- Specified by:
removeUserPassAtin interfaceCiscoDevice- Parameters:
index- Takes in a parameter of index
-
isUserExist
Information provided by the PKI file:
\brief Returns true if the specified authenticated user exists, otherwise false. /param username, the username of the authenticated user of interest. \return bool, true if the specified authenticated user exists, otherwise false.- Specified by:
isUserExistin interfaceCiscoDevice- Parameters:
username- Takes in a parameter of username- Returns:
- boolean Returns a boolean
-